@extends('blog.master')

@section('content')

  <a class="btn btn-primary" href="{{url('b/create')}}">添加文章</a>

 

@foreach($blogs as $val)
   
    <div class="panel panel-default">
      <div class="panel-body">

        {{$val->title}}

        <a href="{{url('/b', $val->id)}}" class="btn btn-info">阅读</a>
        <a href='{{url("/b/$val->id/edit")}}'class="btn btn-info">修改</a>

          <form action="{{ route('b.destroy', $val->id) }}" method="post" style="display: inline-block;">

        {{ csrf_field() }}
         {{ method_field('DELETE') }}
            
            <button type="submit" class="btn btn-danger">删除</button>
        </form>
        </div>
    </div>

@endforeach
     
  <ul class="pagination">

    {!! $blogs->render() !!}

  </ul>

@endsection